﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeatherClock.Data;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace WeatherClock.VariableTemplate
{
    public class VariableStyles: StyleSelector
    {
        protected override Windows.UI.Xaml.Style SelectStyleCore(object item, Windows.UI.Xaml.DependencyObject container)
        {
             FrameworkElement element = container as FrameworkElement;
             if (item != null && element != null)
             {
                 if ((item as HubPageDataItem).UniqueId.StartsWith("Weather"))
                     return App.Current.Resources["StaticContainerStyle"] as Style;
             }
            return base.SelectStyleCore(item, container);
        }
    }
}
